﻿using Oxygen.Client.ServerSymbol.Events;
using RpcInterface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ClientSample
{
    public class HelloCallbackEventhandler : IEventHandler
    {
        [EventHandlerFunc("HelloCallback")]
        public async Task<DefaultEventHandlerResponse> SubscribeByHelloEvent(EventHandleRequest<HelloEventData> input)
        {
            Console.WriteLine($"HelloCallbackEventhandler input: {input.GetData().Words}");
            var result = await Task.FromResult(DefaultEventHandlerResponse.Default());
            Console.WriteLine($"HelloCallbackEventhandler status: {result.status}");
            return result;
        }
    }
}
